package main

import (
	customMiddleware "echo-project-01/echodemo01intro/echo09middleware/middleware"
	"echo-project-01/echodemo01intro/echo09middleware/routers"
	"github.com/labstack/echo/v4"
	"github.com/labstack/echo/v4/middleware"
)

// main
//
//	@Description: 中间件：全局中间件、路由分组中间件、路由中间件
func main() {
	e := echo.New()
	e.Static("/static", "static")

	//全局中间件
	e.Use(middleware.Logger())
	e.Use(middleware.Recover())
	//使用自定义全局中间件
	e.Use(customMiddleware.GlobalMiddleware1)

	//路由分组
	routers.UserRouting(e)
	routers.CarRouting(e)

	e.Start(":80")
}
